//http:开发后台程序
const http = require("http")
const url = require("url")
let server = http.createServer((req, res) => {
    // console.log(req)
    if (req.method == "GET") {
        console.log("get请求")
        console.log(req.url)
        const paramObj = url.parse(req.url, true)
        console.log(paramObj.query.name)
    } else {
        console.log("非get请求")
    }

    res.end("hi")
})
server.listen(3000, () => {
    console.log("服务器已启动，在3000端口监听")
})